<form action="index.php" method="post" name="adminForm">
	<fieldset class="adminform">
		<legend>Details</legend>
            <table class="admintable">
                <tr>
                    <td class="key">Name</td>
					<td>
						<input type="text" name="name" id="name" value="<?php echo $this->division->name; ?>" />
					</td>
				</tr>
                <tr>
                    <td class="key">Parent</td>
					<td>
						<select name="parent_division_id">
							<option value="0">None</option>
							<? foreach($this->divisions as $division): ?>
								<? if($division->division_id != $this->division->division_id): ?>
									<option value="<?= $division->division_id ?>" <?= $division->division_id == $this->division->parent_division_id ? "selected" : "" ?>><?= $division->name ?></option>
								<? endif; ?>
							<? endforeach; ?>
						</select>
					</td>
				</tr>				
             </table>
       </fieldset>
       <input type="hidden" name="option" value="<?php echo JRequest::getVar( 'option' );?>"/>
	   <input type="hidden" name="c" value="<?php echo JRequest::getVar('c', 'division'); ?>" />
       <input type="hidden" name="division_id" value="<?php echo $this->division->division_id; ?>"/>      
       <input type="hidden" name="task" value=""/>
</form>